package com.shujia.wyh.day14;

public class Student {
    private String name;
    int age;
    protected String address;
    public int id;

    public Student() {
    }

    public Student(String name) {
        this.name = name;
    }

    Student(int age) {
        this.age = age;
    }

    private Student(String name, int age) {
        this.name = name;
        this.age = age;
    }


    public void fun1() {
        System.out.println("这是公共的成员方法");
    }

    public void fun3(String s) {
        System.out.println("这是公共的带参数的成员方法" + s);
    }

    private void fun2() {
        System.out.println("这是私有的成员方法");
    }

    private void fun4(String s) {
        System.out.println("这是私有的带参数的成员方法" + s);
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", address='" + address + '\'' +
                ", id=" + id +
                '}';
    }
}
